package com.sen.pro.switches.core.entity;

import java.util.Date;

import org.apache.commons.lang.StringUtils;

/**
 * 新闻实体类
 * 
 * @author tian qingsen
 */
public class News {
	private Integer newsId;
	private String newsTitle;
	private Date newsDate;
	private String descUrl;
	private String fromUrl;
	private String fromIp;
	private String state;

	public Integer getNewsId() {
		return newsId;
	}

	public void setNewsId(Integer newsId) {
		this.newsId = newsId;
	}

	public String getNewsTitle() {
		return newsTitle;
	}

	public void setNewsTitle(String newsTitle) {
		this.newsTitle = newsTitle;
	}

	public Date getNewsDate() {
		return newsDate;
	}

	public void setNewsDate(Date newsDate) {
		this.newsDate = newsDate;
	}

	public String getDescUrl() {
		return descUrl;
	}

	public void setDescUrl(String descUrl) {
		this.descUrl = descUrl;
	}

	public String getFromUrl() {
		return fromUrl;
	}

	public void setFromUrl(String fromUrl) {
		this.fromUrl = fromUrl;
	}

	public String getFromIp() {
		return fromIp;
	}

	public void setFromIp(String fromIp) {
		this.fromIp = fromIp;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getStateDesc() {
		if (StringUtils.isNotBlank(state) || "1".equals(state)) {
			return "已发布";
		}
		return "无效";
	}
}
